package com.wctj.api.base.enums;

/**
 * 汇付的事件类型
 * @author: lzg
 * @description: : https://docs.adapay.tech/api/webhook.html#id6
 */
public enum EventTypeEnums {
    // start 汇付事件类型
    payment ("payment","支付"),
    refund("refund","退款"),
    corp_member("corp_member","开户"),
    payment_reverse("payment_reverse","支付撤销"),
    cash("cash","取现"),
    account_payment("account_payment","钱包支付"),
    fastpay("fastpay","快捷支付"),
    fast_card("fast_card"," 快捷绑卡"),
    unbind_fast_card("unbind_fast_card"," 快捷卡解绑"),
    corp_member_update("corp_member_update"," 更新企业用户"),

    // end 汇付事件类型


    // start 招商事件类型
    YQN01010("YQN01010","账务变动通知"),
    YQN02030("YQN02030","支付结果通知"),
    YQN03010("YQN03010","代发结果通知"),

    // end 招商事件类型


    ;

    private String type;
    private String msg;

    public String getType() {
        return type;
    }

    public String getMsg() {
        return msg;
    }

    EventTypeEnums(String type, String message) {
        this.type = type;
        this.msg = message;
    }

    public static EventTypeEnums of(String name) {
        for (EventTypeEnums plat : EventTypeEnums.values()) {
            if (plat.name().equalsIgnoreCase(name)) {
                return plat;
            }
        }
        return null;
    }
}

